﻿namespace FreshMeat.Storage
{
   /// <summary>
   /// Available modes for opening a file.
   /// </summary>
   public enum OpenMode
   {
      /// <summary>
      /// Creates a new file; if the file already exists, an exception is thrown.
      /// </summary>
      CreateNew = 1,

      /// <summary>
      /// Creates a new file; if the file already exists, it is truncated.
      /// </summary>
      Create,

      /// <summary>
      /// Opens an existing file; if the file doesn't exist, an exception is thrown.
      /// </summary>
      Open,

      /// <summary>
      /// Opens an existing file; if the file doesn't exist, it is created.
      /// </summary>
      OpenOrCreate,

      // Not "natively" supported on win8 
      ///// <summary>
      ///// Opens an existing file and truncates it; if the file does not exist, an exception is thrown.
      ///// </summary>
      //Truncate,

      // Not "natively" supported on win8 
      ///// <summary>
      ///// Opens an existing file and seeks to the end; if the file does not exist, it is created.
      ///// </summary>
      //Append,
   }
}